<?php

namespace App\Http\Validations\Admin;

use Illuminate\Contracts\Validation\Validator;

class BasicValidation {
    public function create() {
        $rules = [
            'basic'=>['required'],
            'category_id'=>['required'],
            'org_id'=>['required'],
            'price'=>['required','numeric'],
        ];
        $attributes = [
            'basic'=>'考场名称',
            'category_id'=>'科目分类',
            'org_id'=>'组织机构',
            'price'=>'考场价格',
        ];
        return ['rules' =>$rules,
            'attributes' => $attributes,
            'messages' => []
        ];
    }

    //验证后添加的钩子函数
    public function customValidate(Validator $validator) {
        //
    }
}
